export function maptoobj<T extends string, Y>(
    map: Map<T, Y>
): { [k: string]: Y } {
    return Object.fromEntries(map.entries());
}
